/**
 * Copyright (c) subnew
 * Licensed under the GPL;
 * @email:joseanluo@gmail.com
 * @Title: Delete.java
 * @Package com.subnew.copyman.frame.dao.annotation
 */
package com.subnew.mango.frame.dao.annotation;

import com.subnew.mango.frame.constant.PropertyType;


/**
 * Hibernate状态删除，如果在orm实体配置该注解，将不会物理删除数据，会根据该配置来进行对orm实体的update操作
 * 
 * <pre>
 * &#064;Entity
 * &#064;Table(name="tb_user")
 * &#064;Delete(propertyName = "state",type = CategoryType.S,value="1")
 * public class User{
 * 	private String username;
 * 	private String state;
 * 
 * 	public User() {
 * 	}
 * 	getter/setter.....
 * }
 * User user = dao.get(1);
 * dao.delete(user);
 * ----------------------------------
 * sql:update tb_user set state = ? where id = ?
 * </pre>
 *
 * @author JoseanLuo
 * @date 2014年8月28日 下午4:21:00
 * @version V1.0
 */
public @interface Delete {
	
	/**
	 * 属性名额。　
	 */
	public String propertyName();
	/**
	 * 要改变的值
	 * <br> 默认值:"1" ;
	 */
    public String value() default "1";
    /**
     *  改变值的类型
	 * <br>默认值:Integer
     */
    public PropertyType type() default PropertyType.I;

}
